home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / AIncludes / AppleGuide.a < prev    next >
Text File  |  1996-05-01  |  10KB  |  441 lines

  1. ;
  2. ;    File:        AppleGuide.a
  3. ;
  4. ;    Contains:    Apple Guide Interfaces.
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Release:    Universal Interfaces 3.0d3 on Copland DR1
  8. ;
  9. ;    Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10. ;
  11. ;    Bugs?:        If you find a problem with this file, send the file and version
  12. ;                information (from above) and the problem description to:
  13. ;
  14. ;                    Internet:    apple.bugs@applelink.apple.com
  15. ;                    AppleLink:    APPLE.BUGS
  16. ;
  17. ;
  18.     IF &TYPE('__APPLEGUIDE__') = 'UNDEFINED' THEN
  19. __APPLEGUIDE__ SET 1
  20.  
  21.     IF &TYPE('__APPLEEVENTS__') = 'UNDEFINED' THEN
  22.     include 'AppleEvents.a'
  23.     ENDIF
  24.     IF &TYPE('__FILES__') = 'UNDEFINED' THEN
  25.     include 'Files.a'
  26.     ENDIF
  27.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  28.     include 'Types.a'
  29.     ENDIF
  30.     IF FOR_SYSTEM7_AND_SYSTEM8_COOPERATIVE THEN
  31. ;  Types
  32. ; typedef UInt32                         AGRefNum
  33.  
  34. ; typedef UInt32                         AGCoachRefNum
  35.  
  36. ; typedef UInt32                         AGContextRefNum
  37.  
  38. AGAppInfo                RECORD 0
  39. eventId                     ds.l    1                ; offset: $0 (0)
  40. refCon                     ds.l    1                ; offset: $4 (4)
  41. contextObj                 ds.l    1                ; offset: $8 (8)        ;  private system field
  42. sizeof                     EQU *                    ; size:   $C (12)
  43.                         ENDR
  44. ; typedef struct AGAppInfo *            AGAppInfoPtr
  45.  
  46. ; typedef AGAppInfoPtr *                AGAppInfoHdl
  47.  
  48. ;  Constants
  49.  
  50. kAGDefault                        EQU        0
  51. kAGFrontDatabase                EQU        1
  52. kAGNoMixin                        EQU        -1
  53.  
  54. kAGViewFullHowdy                EQU        1                    ; Full-size Howdy
  55. kAGViewTopicAreas                EQU        2                    ; Full-size Topic Areas
  56. kAGViewIndex                    EQU        3                    ; Full-size Index Terms
  57. kAGViewLookFor                    EQU        4                    ; Full-size Look-For (Search)
  58. kAGViewSingleHowdy                EQU        5                    ; Single-list-size Howdy
  59. kAGViewSingleTopics                EQU        6                    ; Single-list-size Topics
  60.  
  61. kAGFileMain                        EQU        'poco'
  62. kAGFileMixin                    EQU        'mixn'
  63. ;  To test against AGGetAvailableDBTypes
  64.  
  65. kAGDBTypeBitAny                    EQU        $00000001
  66. kAGDBTypeBitHelp                EQU        $00000002
  67. kAGDBTypeBitTutorial            EQU        $00000004
  68. kAGDBTypeBitShortcuts            EQU        $00000008
  69. kAGDBTypeBitAbout                EQU        $00000010
  70. kAGDBTypeBitOther                EQU        $00000080
  71. ; typedef UInt16                         AGStatus
  72.  
  73. ;  Returned by AGGetStatus
  74.  
  75. kAGIsNotRunning                    EQU        0
  76. kAGIsSleeping                    EQU        1
  77. kAGIsActive                        EQU        2
  78. ; typedef UInt16                         AGWindowKind
  79.  
  80. ;  Returned by AGGetFrontWindowKind
  81.  
  82. kAGNoWindow                        EQU        0
  83. kAGAccessWindow                    EQU        1
  84. kAGPresentationWindow            EQU        2
  85. ;
  86. ; Error Codes
  87. ; Not an enum, because other OSErrs are valid.
  88. ;
  89. ; typedef SInt16                         AGErr
  90.  
  91. ;  Apple Guide error codes
  92.  
  93.                                                             ; -------------------- Apple event reply codes
  94. kAGErrUnknownEvent                EQU        -2900
  95. kAGErrCantStartup                EQU        -2901
  96. kAGErrNoAccWin                    EQU        -2902
  97. kAGErrNoPreWin                    EQU        -2903
  98. kAGErrNoSequence                EQU        -2904
  99. kAGErrNotOopsSequence            EQU        -2905
  100. kAGErrReserved06                EQU        -2906
  101. kAGErrNoPanel                    EQU        -2907
  102. kAGErrContentNotFound            EQU        -2908
  103. kAGErrMissingString                EQU        -2909
  104. kAGErrInfoNotAvail                EQU        -2910
  105. kAGErrEventNotAvailable            EQU        -2911
  106. kAGErrCannotMakeCoach            EQU        -2912
  107. kAGErrSessionIDsNotMatch        EQU        -2913
  108. kAGErrMissingDatabaseSpec        EQU        -2914                ; -------------------- Coach's Chalkboard reply codes
  109. kAGErrItemNotFound                EQU        -2925
  110. kAGErrBalloonResourceNotFound    EQU        -2926
  111. kAGErrChalkResourceNotFound        EQU        -2927
  112. kAGErrChdvResourceNotFound        EQU        -2928
  113. kAGErrAlreadyShowing            EQU        -2929
  114. kAGErrBalloonResourceSkip        EQU        -2930
  115. kAGErrItemNotVisible            EQU        -2931
  116. kAGErrReserved32                EQU        -2932
  117. kAGErrNotFrontProcess            EQU        -2933
  118. kAGErrMacroResourceNotFound        EQU        -2934                ; -------------------- API reply codes
  119. kAGErrAppleGuideNotAvailable    EQU        -2951
  120. kAGErrCannotInitCoach            EQU        -2952
  121. kAGErrCannotInitContext            EQU        -2953
  122. kAGErrCannotOpenAliasFile        EQU        -2954
  123. kAGErrNoAliasResource            EQU        -2955
  124. kAGErrDatabaseNotAvailable        EQU        -2956
  125. kAGErrDatabaseNotOpen            EQU        -2957
  126. kAGErrMissingAppInfoHdl            EQU        -2958
  127. kAGErrMissingContextObject        EQU        -2959
  128. kAGErrInvalidRefNum                EQU        -2960
  129. kAGErrDatabaseOpen                EQU        -2961
  130. kAGErrInsufficientMemory        EQU        -2962
  131. ;
  132. ; Events
  133. ; Not an enum because we want to make assignments.
  134. ;
  135. ; typedef UInt32                         AGEvent
  136.  
  137. ;  Handy events for AGGeneral.
  138.  
  139.                                                             ; Panel actions (Require a presentation window).
  140. kAGEventDoCoach                    EQU        'doco'
  141. kAGEventDoHuh                    EQU        'dhuh'
  142. kAGEventGoNext                    EQU        'gonp'
  143. kAGEventGoPrev                    EQU        'gopp'
  144. kAGEventHidePanel                EQU        'pahi'
  145. kAGEventReturnBack                EQU        'gobk'
  146. kAGEventShowPanel                EQU        'pash'
  147. kAGEventTogglePanel                EQU        'patg'
  148. ;
  149. ; Functions
  150. ; AGClose
  151. ; Close the database associated with the AGRefNum.
  152. ;
  153. ;
  154. ; pascal AGErr AGClose(AGRefNum *refNum)
  155. ;
  156.     IF ¨ GENERATINGCFM THEN
  157.         Macro
  158.         _AGClose
  159.             moveq               #17,D0
  160.             dc.w                $AA6E
  161.         EndM
  162.     ELSE
  163.         IMPORT_CFM_FUNCTION AGClose
  164.     ENDIF
  165.  
  166. ;
  167. ; AGGeneral
  168. ; Cause various events to happen.
  169. ;
  170. ;
  171. ; pascal AGErr AGGeneral(AGRefNum refNum, AGEvent theEvent)
  172. ;
  173.     IF ¨ GENERATINGCFM THEN
  174.         Macro
  175.         _AGGeneral
  176.             moveq               #13,D0
  177.             dc.w                $AA6E
  178.         EndM
  179.     ELSE
  180.         IMPORT_CFM_FUNCTION AGGeneral
  181.     ENDIF
  182.  
  183. ;
  184. ; AGGetAvailableDBTypes
  185. ; Return the database types available for this application.
  186. ;
  187. ;
  188. ; pascal UInt32 AGGetAvailableDBTypes(void )
  189. ;
  190.     IF ¨ GENERATINGCFM THEN
  191.         Macro
  192.         _AGGetAvailableDBTypes
  193.             moveq               #8,D0
  194.             dc.w                $AA6E
  195.         EndM
  196.     ELSE
  197.         IMPORT_CFM_FUNCTION AGGetAvailableDBTypes
  198.     ENDIF
  199.  
  200. ;
  201. ; AGGetFrontWindowKind
  202. ; Return the kind of the front window.
  203. ;
  204. ;
  205. ; pascal AGWindowKind AGGetFrontWindowKind(AGRefNum refNum)
  206. ;
  207.     IF ¨ GENERATINGCFM THEN
  208.         Macro
  209.         _AGGetFrontWindowKind
  210.             moveq               #12,D0
  211.             dc.w                $AA6E
  212.         EndM
  213.     ELSE
  214.         IMPORT_CFM_FUNCTION AGGetFrontWindowKind
  215.     ENDIF
  216.  
  217. ;
  218. ; AGGetFSSpec
  219. ; Return the FSSpec for the AGRefNum.
  220. ;
  221. ;
  222. ; pascal AGErr AGGetFSSpec(AGRefNum refNum, FSSpec *fileSpec)
  223. ;
  224.     IF ¨ GENERATINGCFM THEN
  225.         Macro
  226.         _AGGetFSSpec
  227.             moveq               #15,D0
  228.             dc.w                $AA6E
  229.         EndM
  230.     ELSE
  231.         IMPORT_CFM_FUNCTION AGGetFSSpec
  232.     ENDIF
  233.  
  234. ;
  235. ; AGGetStatus
  236. ; Return the status of Apple Guide.
  237. ;
  238. ;
  239. ; pascal AGStatus AGGetStatus(void )
  240. ;
  241.     IF ¨ GENERATINGCFM THEN
  242.         Macro
  243.         _AGGetStatus
  244.             moveq               #9,D0
  245.             dc.w                $AA6E
  246.         EndM
  247.     ELSE
  248.         IMPORT_CFM_FUNCTION AGGetStatus
  249.     ENDIF
  250.  
  251. ;
  252. ; AGInstallCoachHandler
  253. ; Install a Coach object location query handler.
  254. ;
  255. ;
  256. ; pascal AGErr AGInstallCoachHandler(CoachReplyUPP coachReplyProc, long refCon, AGCoachRefNum *resultRefNum)
  257. ;
  258.     IF ¨ GENERATINGCFM THEN
  259.         Macro
  260.         _AGInstallCoachHandler
  261.             moveq               #18,D0
  262.             dc.w                $AA6E
  263.         EndM
  264.     ELSE
  265.         IMPORT_CFM_FUNCTION AGInstallCoachHandler
  266.     ENDIF
  267.  
  268. ;
  269. ; AGInstallContextHandler
  270. ; Install a context check query handler.
  271. ;
  272. ;
  273. ; pascal AGErr AGInstallContextHandler(ContextReplyUPP contextReplyProc, AEEventID eventID, long refCon, AGContextRefNum *resultRefNum)
  274. ;
  275.     IF ¨ GENERATINGCFM THEN
  276.         Macro
  277.         _AGInstallContextHandler
  278.             moveq               #19,D0
  279.             dc.w                $AA6E
  280.         EndM
  281.     ELSE
  282.         IMPORT_CFM_FUNCTION AGInstallContextHandler
  283.     ENDIF
  284.  
  285. ;
  286. ; AGIsDatabaseOpen
  287. ; Return true if the database associated with the AGRefNum is open.
  288. ;
  289. ;
  290. ; pascal Boolean AGIsDatabaseOpen(AGRefNum refNum)
  291. ;
  292.     IF ¨ GENERATINGCFM THEN
  293.         Macro
  294.         _AGIsDatabaseOpen
  295.             moveq               #6,D0
  296.             dc.w                $AA6E
  297.         EndM
  298.     ELSE
  299.         IMPORT_CFM_FUNCTION AGIsDatabaseOpen
  300.     ENDIF
  301.  
  302. ;
  303. ; AGOpen
  304. ; Open a guide database.
  305. ;
  306. ;
  307. ; pascal AGErr AGOpen(FSSpec *fileSpec, UInt32 flags, Handle mixinControl, AGRefNum *resultRefNum)
  308. ;
  309.     IF ¨ GENERATINGCFM THEN
  310.         Macro
  311.         _AGOpen
  312.             moveq               #1,D0
  313.             dc.w                $AA6E
  314.         EndM
  315.     ELSE
  316.         IMPORT_CFM_FUNCTION AGOpen
  317.     ENDIF
  318.  
  319. ;
  320. ; AGOpenWithSearch
  321. ; Open a guide database and preset a search string.
  322. ;
  323. ;
  324. ; pascal AGErr AGOpenWithSearch(FSSpec *fileSpec, UInt32 flags, Handle mixinControl, ConstStr255Param searchString, AGRefNum *resultRefNum)
  325. ;
  326.     IF ¨ GENERATINGCFM THEN
  327.         Macro
  328.         _AGOpenWithSearch
  329.             moveq               #2,D0
  330.             dc.w                $AA6E
  331.         EndM
  332.     ELSE
  333.         IMPORT_CFM_FUNCTION AGOpenWithSearch
  334.     ENDIF
  335.  
  336. ;
  337. ; AGOpenWithSequence
  338. ; Open a guide database and display a presentation window sequence.
  339. ;
  340. ;
  341. ; pascal AGErr AGOpenWithSequence(FSSpec *fileSpec, UInt32 flags, Handle mixinControl, short sequenceID, AGRefNum *resultRefNum)
  342. ;
  343.     IF ¨ GENERATINGCFM THEN
  344.         Macro
  345.         _AGOpenWithSequence
  346.             moveq               #4,D0
  347.             dc.w                $AA6E
  348.         EndM
  349.     ELSE
  350.         IMPORT_CFM_FUNCTION AGOpenWithSequence
  351.     ENDIF
  352.  
  353. ;
  354. ; AGOpenWithView
  355. ; Open a guide database and override the default view.
  356. ;
  357. ;
  358. ; pascal AGErr AGOpenWithView(FSSpec *fileSpec, UInt32 flags, Handle mixinControl, short viewNum, AGRefNum *resultRefNum)
  359. ;
  360.     IF ¨ GENERATINGCFM THEN
  361.         Macro
  362.         _AGOpenWithView
  363.             moveq               #5,D0
  364.             dc.w                $AA6E
  365.         EndM
  366.     ELSE
  367.         IMPORT_CFM_FUNCTION AGOpenWithView
  368.     ENDIF
  369.  
  370. ;
  371. ; AGQuit
  372. ; Make Apple Guide quit.
  373. ;
  374. ;
  375. ; pascal AGErr AGQuit(void )
  376. ;
  377.     IF ¨ GENERATINGCFM THEN
  378.         Macro
  379.         _AGQuit
  380.             moveq               #16,D0
  381.             dc.w                $AA6E
  382.         EndM
  383.     ELSE
  384.         IMPORT_CFM_FUNCTION AGQuit
  385.     ENDIF
  386.  
  387. ;
  388. ; AGRemoveCoachHandler
  389. ; Remove the Coach object location query handler.
  390. ;
  391. ;
  392. ; pascal AGErr AGRemoveCoachHandler(AGCoachRefNum *resultRefNum)
  393. ;
  394.     IF ¨ GENERATINGCFM THEN
  395.         Macro
  396.         _AGRemoveCoachHandler
  397.             moveq               #20,D0
  398.             dc.w                $AA6E
  399.         EndM
  400.     ELSE
  401.         IMPORT_CFM_FUNCTION AGRemoveCoachHandler
  402.     ENDIF
  403.  
  404. ;
  405. ; AGRemoveContextHandler
  406. ; Remove the context check query handler.
  407. ;
  408. ;
  409. ; pascal AGErr AGRemoveContextHandler(AGContextRefNum *resultRefNum)
  410. ;
  411.     IF ¨ GENERATINGCFM THEN
  412.         Macro
  413.         _AGRemoveContextHandler
  414.             moveq               #21,D0
  415.             dc.w                $AA6E
  416.         EndM
  417.     ELSE
  418.         IMPORT_CFM_FUNCTION AGRemoveContextHandler
  419.     ENDIF
  420.  
  421. ;
  422. ; AGStart
  423. ; Start up Apple Guide in the background.
  424. ;
  425. ;
  426. ; pascal AGErr AGStart(void )
  427. ;
  428.     IF ¨ GENERATINGCFM THEN
  429.         Macro
  430.         _AGStart
  431.             moveq               #10,D0
  432.             dc.w                $AA6E
  433.         EndM
  434.     ELSE
  435.         IMPORT_CFM_FUNCTION AGStart
  436.     ENDIF
  437.  
  438.     ENDIF
  439.     ENDIF ; __APPLEGUIDE__ 
  440.  
  441.